package src.test;

import src.helpers.Barrier;
import src.helpers.Semaphore;

public class Father extends Thread{
	
	Semaphore mutex = new Semaphore();
	Barrier barrier = new Barrier(3);
	public Father(Semaphore x ){
		mutex = x ;
	}
	
	public void run(){

		try {
			mutex.down();
			Baby baby1 = new Baby(1, barrier);
			Baby baby2 = new Baby(1, barrier);
			baby1.start();
			baby2.start();
			System.out.print("lol");
			//barrier.releaseAll();
			
			
		} catch (InterruptedException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

	}
}
